package com.corffen.design.strategy;

public class TestStrategy {
    public static void main(String[] args) {
        testInterpolator(new LinearInterpolator());
        testInterpolator(new AccelerateInterpolator());
    }

    private static void testInterpolator(Interpolator interpolator) {
        System.out.println(interpolator.toString());
        Animator animator = new Animator();
        animator.setDuration(1000L);
        animator.setValue(400.0f,600.0f);
        animator.setInterpolator(interpolator);
        animator.addUpdateAnimatorListener(new Animator.UpdateAnimationListener() {
            @Override
            public void updateAnimator(float value) {
                System.out.println(animator.getProperty() + "," + value);
            }
        });
        animator.start();
    }
}
